﻿using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Threading.Tasks;
using System.Windows;

namespace NodeEditor
{
    /// <summary>
    /// Interaction logic for App.xaml
    /// </summary>
    public partial class App : Application
    {
	    protected override void OnStartup(StartupEventArgs e) {
		    AppDomain.CurrentDomain.UnhandledException += (sender, args) => {
		        MessageBox.Show($"Unhandled exception: {args.ExceptionObject}");
		    };

		    DispatcherUnhandledException += (sender, args) => {
		        MessageBox.Show($"Dispatcher exception: {args.Exception.Message}");
		        args.Handled = true;
		    };

		    base.OnStartup(e);
		}
    }
}
